package com.zyy.java8.samples.stream;

import java.util.Arrays;

/**
 * @author zhangyiying
 * @ClassName: Streams9
 * @Description: 字符串类型流的处理方式
 * @date 2021/12/28 14:22
 */
public class Streams9 {

    public static void main(String[] args) {
        Arrays.asList("a1", "a2", "b1", "c2", "c1")
                .stream()
                .filter(s -> s.startsWith("c"))
                .map(s -> s.toUpperCase())
                .sorted()
                .forEach(System.out::println);

        //C1
        //C2
    }
}
